static void _httpSub(http_entity_t *http)
{
    queue *q = factoryGetQueue(http->queue);
    if (q == NULL) {
        http_set_status(http, 404);
        return;
    }

    char *p = http_get_body(http);
    if (strlen(p) == 0) {
        http_set_status(http, 400);
        return;
    }

    char *cn = http_get_header(http, "Number");
    char *ci =  http_get_header(http, "Interval");

    int number = (cn == NULL) ? 1 : atoi(cn);
    int interval = (ci == NULL) ? 0 : atoi(ci);

    int n = factorySub(http->queue, p, number, interval);
    http_set_count(http, n);
}
